package com.nowcoder.community.entity;

import com.baomidou.mybatisplus.annotation.TableName;
import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;
import java.time.LocalDateTime;
import java.io.Serializable;
import java.util.Date;

import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.experimental.Accessors;

/**
 * <p>
 * 
 * </p>
 *
 * @author 朱哥
 * @since 2025-02-27
 */
@Data
@EqualsAndHashCode(callSuper = false)
@Accessors(chain = true)
@TableName("comment")
public class Comment implements Serializable {

    private static final long serialVersionUID = 1L;

    @TableId(value = "id", type = IdType.AUTO)
    private int id;

    private int userId;

    private int entityType;//评论的目标类型(帖子、评论)

    private int entityId;//评论的目标ID(帖子的id、评论的id)

    private int targetId;//回复的对象（如果目标类型是帖子或评论： 0 , 回复2的回复的是回复1：那么回复2的targetId就是回复1的UserId）

    private String content;

    private int status;//0：正常 1：删除

    private Date createTime;


}
